﻿Imports System.Data

Public Class See_Page
    Public Sub Initialize()
        TextBoxTableId.Text = ""
        TextBoxContent.Text = ""
    End Sub

    Private Sub ButtonOK_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles ButtonOK.Click
        Dim DS As DataSet = HallServe.See(Convert.ToInt32(TextBoxTableId.Text))
        For Each ROW As DataRow In DS.Tables("See").Rows
            TextBoxContent.Text += "菜名:" + ROW("菜名").ToString
            TextBoxContent.Text += vbCrLf
            TextBoxContent.Text += "点菜数量:" + ROW("数量").ToString
            TextBoxContent.Text += vbCrLf
            TextBoxContent.Text += "上菜情况:" + ROW("上菜情况").ToString
            TextBoxContent.Text += vbCrLf + vbCrLf
        Next
    End Sub

    Private Sub ButtonReSet_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles ButtonReSet.Click
        Initialize()
    End Sub

    Private Sub See_Page_KeyDown(sender As Object, e As System.Windows.Input.KeyEventArgs) Handles Me.KeyDown
        If e.Key = Key.Return Then ButtonOK_Click(sender, New RoutedEventArgs)
    End Sub
End Class
